/**
 * Copyright 2007-2008. Chongqing First Information & Network Co., Ltd. All
 * rights reserved. <a>http://www.cqfirst.com.cn</a>
 */
package com.cqcis.uip.base.framework.codec.impl;

import com.cqcis.uip.base.framework.codec.ObjectEncoder;
import com.cqcis.uip.base.framework.filters.adaptor.AbstractProtocolObjectEncoder;
import com.cqcis.uip.base.framework.utils.ByteBuffer;

/**
 * 编码适配器默认实现
 * 
 * @author huangmy
 * @date   2007-12-20
 */
public class DefaultProtocolObjectEncoder extends AbstractProtocolObjectEncoder {
    private ObjectEncoder encoder;
	
	public ByteBuffer doEncode(Object message) throws Exception {		
		return encoder.encode(message);
	}

	public void setEncoder(ObjectEncoder encoder) {
		this.encoder = encoder;
	}

}
